#pragma once

#include <memory>
#include <mutex>
#include "json.h"
#include "BgmCurtainPlay.h"

class BgmListManager{
public:
    using Ptr = std::shared_ptr<BgmListManager>; 
    static Ptr Instance();
    BgmListManager();

    ~BgmListManager();

    void RegistRPC();

    bool isBgmCurtainExist();
    
private:
    bool bgmList(const Json::Value& req_params, Json::Value& res_result, std::string& errinfo);

    bool clearBgmList(const Json::Value& req_params, Json::Value& res_result, std::string& errinfo);

    bool removeFilesInDirectory(const char* directoryPath);
};